package com.ruoyi.db.domain;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

/**
 * 风控结果表对象 ml_risk_result_info
 * 
 * @author ruoyi
 * @date 2023-05-26
 */
@Data
public class RiskResultInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 信息ID */
    @Excel(name = "信息ID")
    private Long baseId;

    /** 任务ID */
    @Excel(name = "任务ID")
    private Long taskId;

    /** 配置ID */
    @Excel(name = "配置ID")
    private Long configId;

    /** 商户ID */
    @Excel(name = "商户ID")
    private String dataId;

    /** 商户类型 */
    @Excel(name = "商户类型")
    private String dataType;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long uid;

    /** 用户名称 */
    @Excel(name = "用户名称")
    private String username;

    /** 手机号 */
    @Excel(name = "手机号")
    private String mobile;

    /** 身份证号 */
    @Excel(name = "身份证号")
    private String idcard;

    /**  */
    @Excel(name = "")
    private Long status;

    /**  */
    @Excel(name = "")
    private String result;

    /**  */
    @Excel(name = "")
    private String code;

    /**  */
    @Excel(name = "")
    private String message;

    /**  */
    @Excel(name = "")
    private String paramInfo;

    /**  */
    @Excel(name = "")
    private String resultInfo;

    private String dateInfo;

    public String startDateInfo;

    public String endDateInfo;


    public String getStartDateInfo(){
        if (StrUtil.isNotEmpty(dateInfo) && StrUtil.isEmpty(startDateInfo)){
            String[] split = dateInfo.split(" ~ ");
            this.startDateInfo = split[0];
            return startDateInfo;
        }
        return startDateInfo;
    }

    public String getEndDateInfo(){
        if (StrUtil.isNotEmpty(dateInfo) && StrUtil.isEmpty(endDateInfo)){
            String[] split = dateInfo.split(" ~ ");
            this.endDateInfo = split[1];
            return endDateInfo;
        }
        return endDateInfo;
    }


}
